<div class="tab_bar">

	<span class="tab" id="aboutme_tab" onmouseover="TabHoverOn('aboutme_tab');" onmouseout="TabHoverOff('aboutme_tab');" onclick="TabSetActive('aboutme_tab');">
		Profile
	</span>
	<span class="tab" id="pictures_tab" onmouseover="TabHoverOn('pictures_tab');" onmouseout="TabHoverOff('pictures_tab');" onclick="TabSetActive('pictures_tab');">
		Pictures
	</span>
	<span class="tab" id="music_tab" onmouseover="TabHoverOn('music_tab');" onmouseout="TabHoverOff('music_tab');" onclick="TabSetActive('music_tab');">
		Music
	</span>
	<!--<span class="tab" id="videos_tab" onmouseover="TabHoverOn('videos_tab');" onmouseout="TabHoverOff('videos_tab');" onclick="TabSetActive('videos_tab');">
		Videos
	</span>
	<span class="tab" id="games_tab" onmouseover="TabHoverOn('games_tab');" onmouseout="TabHoverOff('games_tab');" onclick="TabSetActive('games_tab');">
		Games
	</span>!-->
	<span class="tab" id="blog_tab" onmouseover="TabHoverOn('blog_tab');" onmouseout="TabHoverOff('blog_tab');" onclick="TabSetActive('blog_tab');">
		Blog
	</span>
	<span class="tab" id="buzz_tab" onmouseover="TabHoverOn('buzz_tab');" onmouseout="TabHoverOff('buzz_tab');" onclick="TabSetActive('buzz_tab');">
		Buzz
	</span>

</div>

<?php

	$tab = $_GET["tab"];
	
	if (!$tab)
	{
		$tab = "aboutme";
	}
	
	include $tab . ".php";

?>

<script type="text/javascript">
	<?php if ($tab) { ?>
	var tab_activeItem = document.getElementById("<?php echo $tab ?>_tab");
	<?php } ?>
	
	TabSetInitial("<?php echo $tab ?>_tab");
	
	function TabHoverOn(destID)
	{
		destObj = document.getElementById(destID);
		
		if (destObj != tab_activeItem)
		{
			destObj.className = "tab_hover";
		}
	}

	function TabHoverOff(destID)
	{
		destObj = document.getElementById(destID);
		
		if (destObj != tab_activeItem)
		{
			destObj.className = "tab";
		}
	}

	function TabSetActive(destID)
	{
		destObj = document.getElementById(destID);
		
		if (tab_activeItem != null)
		{
               tab_activeItem.className = "tab";
		}
		tab_activeItem = destObj;
		destObj.className = "tab_active";
		
		top.location = "frame.php?page=profile&tab=" + tab_activeItem.id.split("_")[0];
	}
	
	function TabSetInitial(destDivID)
	{		
		document.getElementById(destDivID).className = "tab_active";
	}
</script>